<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
		<title>系统用户-新增</title>
		<link rel="icon" href="assets/img/lcxm.ico" type="image/ico">
		<script type="text/javascript" src="../../commonFragment/header.js"></script>
		<script type="text/javascript" src="../../commonFragment/nojs.header.js" ></script>
		<script>
			$(function(){
				var id = $("#id").val();
				if(id){//编辑页面删除密码
					$("[name='password']").closest(".form-group").remove();
				}
			});
		</script>
	</head>
	<body>
		<div class="container-fluid p-t-15">
			<div class="row">
				<div class="col-lg-12">
					<div class="card">
						<div class="card-body">
							<form class="form-horizontal validate" role="form vue-form" method="post" action="/system/user/save"
							 data-form-url="/system/user/detail">
								<div class="form-group hide">
									<label for="parentId" class="col-sm-2 control-label">隐藏的*</label>
									<div class="col-sm-6 ">
										<input type="text" id="id" name="id" :value="id" />
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">用户名*</label>
									<div class="col-sm-6 ">
										<input type="text" class="form-control" id="username" name="username" :value="username" 
										 data-rule-repeat="/system/user/check"
										 data-msg-repeat="名称重复" data-rule-required="true" 
										 placeholder="请输入用户名" 
										 autocomplete="off"/>
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">头像*</label>
									<div class="col-sm-6 ">
										<input type="hidden" name="avatar" :value="avatar" data-rule-required="true" /> 
										<input type="file" class="fileupload" data-preview="true" data-rule-accept="image/*" data-display-id="avatar" />
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">密码*</label>
									<div class="col-sm-6 ">
										<input type="password" class="form-control" id="password" name="password"  data-rule-required="true" data-rule-digits="false" data-rule-number="false"
										 placeholder="请输入密码"
										 autocomplete="off"/>
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>

								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">昵称*</label>
									<div class="col-sm-6 ">
										<input type="text" class="form-control" id="nickname" name="nickname" :value="nickname" data-rule-required="true"
										 data-rule-digits="false" data-rule-number="false" placeholder="请输入昵称">
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">电话*</label>
									<div class="col-sm-6 ">
										<input type="text" class="form-control" id="phone" name="phone" :value="phone" data-rule-required="true"
										 data-rule-digits="false" data-rule-number="false" placeholder="请输入电话">
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">邮箱*</label>
									<div class="col-sm-6 ">
										<input type="text" class="form-control" id="email" name="email" :value="email" data-rule-required="true"
										 data-rule-digits="false" data-rule-number="false" placeholder="请输入邮箱">
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">生日*</label>
									<div class="col-sm-6 ">
										<div class="input-group">
											<input class="datetime" id="birthday" name="birthday" type="text" :value="birthday" data-date-format="yyyy-mm-dd"
											 data-min-view="2" data-end-date-target="now" readonly>
										</div>
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">性别*</label>
									<div class="col-sm-6 ">
										<select class="form-control" id="gender" name="gender" :data-value="gender" :value="gender"
										 data-rule-required="true">
											<option value="">--请选择--</option>
											<option value="0">保密</option>
											<option value="1">男</option>
											<option value="2">女</option>
										</select>
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">状态*</label>
									<div class="col-sm-6 ">
										<select class="form-control" id="enable" name="enable" :data-value="enable" :value="enable"
										 data-rule-required="true">
											<option value="">--请选择--</option>
											<option value="true">启用</option>
											<option value="false">禁用</option>
										</select>
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>
								
								<div class="form-group">
									<label for="parentId" class="col-sm-2 control-label">角色*</label>
									<div class="col-sm-6 ">
										<select class="form-control select2" id="roleIds" name="roleIds" :data-value="roleIds" :value="roleIds" multiple="multiple"
										 data-rule-required="true" data-url="/system/common/roleSelect">
											<option value="">--请选择(可多选)--</option>
										</select>
									</div>
									<div class="col-sm-4  help-inline form-control-static"></div>
								</div>

								<div class="form-group clearfix">
									<div class="col-sm-offset-3 col-sm-9">
										<button type="button" class="btn btn-primary action-ajax-form">
											<i class="glyphicon glyphicon-ok"></i> 提交
										</button>
										<button type="button" class="btn btn-info action-close-tab">
											<i class="glyphicon glyphicon-repeat"></i> 返回
										</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
